package dao

import (
	"gorm.io/gorm"
	"time"
)

type Question struct {
	gorm.Model
	ClassName         string    `json:"className" gorm:"type:varchar(50);common:'分类名称'"`
	QuestionClassName string    `json:"questionClassName" gorm:"type:varchar(30);common:'题型分类'"`
	QuestionBody      string    `json:"questionBody" gorm:"type:varchar(255);common:'题干'"`
	Check             string    `json:"check" gorm:"type:varchar(255);common:'正确答案'"`
	Easy              string    `json:"easy" gorm:"type:varchar(30);common:'难度'"`
	CreateTime        time.Time `json:"createTime" gorm:"datetime;common:'时间'"`
}

func (Question) TableName() string {
	return "c_question"
}

type Cate struct {
	gorm.Model
	ClassName string `json:"className" gorm:"type:varchar(50);common:'分类名称'"`
	Pid       int    `json:"pid" gorm:"type:int(10);common:'父级分类'"`
}

func (Cate) TableName() string {
	return "c_cate"
}
